//package cn.yup.web.advice;
//
//import cn.yup.exception.MyException;
//import cn.yup.query.JSONResult;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//@ControllerAdvice
//   public class HandlerExceptionControllerAdvice {
//
//    @ExceptionHandler(MyException.class)
//    @ResponseBody
//    public JSONResult error(MyException ex) {
//        System.out.println("ex.getMessage() = " + ex.getMessage());
//        return new JSONResult().mark(ex.getMessage());
//    }
//
//    @ExceptionHandler(Exception.class)
//    @ResponseBody
//    public JSONResult error(Exception ex) {
//        return new JSONResult().mark("页面飞走了");
//    }
//}